<script setup lang="ts">
defineProps<{
  src?: string
  label: string
}>()
</script>

<template>
  <view class="overflow-hidden rounded-10rpx">
    <image
      v-if="src"
      class="h-200rpx w-318rpx"
      :src="src"
    />
    <view v-else class="h-200rpx w-318rpx flex items-center justify-center bg-#3F8BF6 bg-opacity-10">
      <slot name="placeholder" />
    </view>
    <view class="h-66rpx flex items-center justify-center bg-#3F8BF6 text-32rpx text-white leading-45rpx">
      {{ label }}
    </view>
  </view>
</template>
